home *** CD-ROM | disk | FTP | other *** search
- /*
- File: NmSpcUtl.h
-
- Contains: Utilities for working with NameSpaces.
-
- Owned by: Caia Grisar
-
- Copyright: © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
-
-
-
- In Progress:
-
- */
-
-
- #ifndef _NMSPCUTL_
- #define _NMSPCUTL_
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #ifndef _STORUTIL_
- #include "StorUtil.h"
- #endif
-
- class ODValueNameSpace;
- class ODValueIterator;
-
- extern "C" {
- void ValueNameSpaceRegister(ODValueNameSpace* ns, Environment* ev, ODISOStr key, ODPtr buffer, ODULong size);
-
- ODBoolean ValueNameSpaceGetEntry(ODValueNameSpace* ns, Environment* ev, ODISOStr key, ODPtr* value, ODULong* valueLength);
- // value must be a pointer to where you would like to have a
- // pointer written. If the entry exists, a copy will be
- // allocated and returned in *value, which you must eventually
- // deallocate (because you now own this space); otherwise
- // *value will be nil when there is no such entry.
-
- ODBoolean ValueNameSpaceGetODName(ODValueNameSpace* ns, Environment* ev, ODISOStr key, ODName** value);
- // value must be a pointer to an ODName to where you would like to have a
- // pointer written. If the entry exists, an IText will be created
- // and returned in *value, which you must eventually
- // dispose of (because you now own this space); otherwise
- // *value will be nil when there is no such entry.
-
- void ValueIteratorFirst(ODValueIterator* nsitr, Environment* ev, ODISOStr* key, ODPtr* value, ODULong* valueLength);
- // Unless the iteration is complete, *key and *value return
- // newly allocated copies of the next key and value. You are
- // responsible for deallocated this space when you are done
- // with it.
-
- void ValueIteratorNext(ODValueIterator* nsitr, Environment* ev, ODISOStr* key, ODPtr* value, ODULong* valueLength);
- // Unless the iteration is complete, *key and *value return
- // newly allocated copies of the next key and value. You are
- // responsible for deallocated this space when you are done
- // with it.
-
- ODISOStr ValueNameSpaceGetString( ODSession*, ODISOStr nameSpaceName, ODISOStr key );
- // ** Returns pointer to new copy of string, or NULL.
-
- void ValueNameSpaceWriteToFile( ODValueNameSpace* ns, PlatformFile* file );
- void ValueNameSpaceReadFromFile( ODValueNameSpace* ns, PlatformFile* file );
- ODTradITextData* CreateFlatIText(ODScriptCode scriptCode, ODLangCode langCode,
- char* theText, ODUShort textLen);
- }
-
- #endif